public class t746 {
    public static void main(String[] args) {
        int arr [] = {1,100,1,1,1,100,1,1,100,1};
        int num = arr.length;
        int dp [] = new int [num+1];
        dp[0] = 0;
        dp[1] = 0;
        for(int i =2;i<=num;i++){
            dp[i] = Math.min(dp[i-1]+arr[i-1],dp[i-2]+arr[i-2]);
        }
        //return dp[num];
        System.out.println(dp[num]);


    }
}
